<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<button id="btn">点击</button>
	<script>
		var btn = document.getElementById('btn');
		btn.onclick = function(){
			/*console.log(this);

			
			a({name:"张三"});*/
			// a(this);

			/*
				
				.call(this的指向,本身函数要传入的参数1,参数2,参数N)
				.apply(this的指向,[本身函数要传入的参数1,参数2,参数N]);
			*/
			// b();
			/*var obj = {name:"张三"};
			b.call(obj,event);
			b(event);*/
			var _this = this;
			// a(_this);
			b.call(_this,event,1,2);
			b.apply(_this,[event,1,2])
		}



		function a(obj){
			obj.style.display = "none";
			console.log(obj);
			console.log(this);
		}
		function b(event,a,b){
			var event = event||window.event;
			console.log(event,a,b);
			console.log(this);
		}
	</script>
</body>
</html>